# 签名算法
#
# 1、appId，thirdUserId，mobile，timestamp字段排序，组成签名前字符串，(cmd部分非必填.)如下：
#
# appId300452627mobile14510244212thirdUserId10241145111timestamp1615810548685
#
# 2、与appSecret合起来，md5并大写；md5(签名前字符串appSecret).toUppderCase
# MD5（appId+thirdUserId+mobile+timestamp+appSecret）后转16进制大写字符串

url = 'https://prem.ddky.com/route/6/index.html?userTel=18939947838&userId=bcbde287bf6111e9908cec0d9acef91e&timestamp=1627357186826&thirdSign=A3B9BB5F24B2857D0B717F7C1C7E2F82'

import string
import hashlib
import random
import time
import requests

appId = '1275011001004'
thirdUserId = '10014212'
mobile = '1714142436'
timeStamp = str(int(round(time.time()*1000)))
appSecret = 'c686954df9ad4815ab83d5105e88d454'
# nonce = ''.join(random.sample(string.digits, 8))
signStr = appId + thirdUserId + mobile + timeStamp + appSecret

def md5forsign(signStr):
    md = hashlib.md5()
    md.update(signStr.encode())
    res = md.hexdigest().upper()
    return res

signStr = md5forsign(signStr)

print('timeStamp: %s,signStr: %s' % (timeStamp, signStr))








